<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@ taglib uri="http://www.springframework.org/security/tags" prefix="security"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<!-- User Account: style can be found in dropdown.less -->
<li class="dropdown user user-menu"><a href="#" class="dropdown-toggle" data-toggle="dropdown"> <i class="glyphicon glyphicon-user"></i> <span>
${sessionScope.SPRING_SECURITY_CONTEXT.authentication.principal.firstName},${sessionScope.SPRING_SECURITY_CONTEXT.authentication.principal.lastName}
<i class="caret"></i> </span>
</a>
	<ul class="dropdown-menu">
		<!-- User image -->
		<li class="user-header bg-light-blue"><img
			src="${pageContext.servletContext.contextPath}/loadImage.html?type=THUMB&fileId=${sessionScope.SPRING_SECURITY_CONTEXT.authentication.principal.avatarId}"
			class="img-circle" />

			<p>
				${sessionScope.SPRING_SECURITY_CONTEXT.authentication.principal.firstName}
				- Quản trị viên <small><spring:message code="admin.user.created.date" /> <fmt:setLocale value="${pageContext.request.locale}" /> <fmt:formatDate
						value="${sessionScope.SPRING_SECURITY_CONTEXT.authentication.principal.createdDate}" /></small>
			</p></li>
		<!-- Menu Body -->
		<%-- <li class="user-body">
			<div class="col-xs-4 text-center">
				<a href="#"><spring:message code="admin.user.facebook" /></a>
			</div>
			<div class="col-xs-4 text-center">
				<a href="#"><spring:message code="admin.user.google.plus" /></a>
			</div>
			<div class="col-xs-4 text-center">
				<a href="#"><spring:message code="admin.user.gmail" /></a>
			</div>
		</li> --%>
		<!-- Menu Footer-->
		<li class="user-footer">
			<div class="pull-left">
				<a href="viewUserInfo.html?id=${sessionScope.SPRING_SECURITY_CONTEXT.authentication.principal.id}" class="btn btn-default btn-flat"><spring:message code="admin.user.profile" /></a>
			</div>
			<div class="pull-right">
				<a href="<c:url value="/j_spring_security_logout" />" class="btn btn-default btn-flat"><spring:message code="admin.user.signout" /></a>
			</div>
		</li>
	</ul></li>